package org.qiyu.live.api.controller;

import jakarta.annotation.Resource;
import org.live.frmework.web.starter.error.BizBaseErrorEnum;
import org.live.frmework.web.starter.error.ErrorAssert;
import org.qiyu.live.api.service.IBankService;
import org.qiyu.live.common.interfaces.vo.WebResponseVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: WangJiYou
 * @Date: 2025/01/20/21:37
 * @Description:
 */
@RestController
@RequestMapping("/bank")
public class BankController {

    @Resource
    private IBankService bankService;

    @PostMapping("/products")
    public WebResponseVO products(Integer type) {
        ErrorAssert.isNotNull(type, BizBaseErrorEnum.PARAM_ERROR);
        return WebResponseVO.success(bankService.products(type));
    }
}